dundas.Drawing Class

 
 

Properties

 
  Name Description
  PIXEL_PRECISION  
 
 

Constants

 
  Name Description

PIXEL_PRECISION
 
 

Methods

 
  Name Description

Static
applyCssBrush Applies any type of brush to a specified property.

Static
applySvgBrush Applies any type of brush to a specified property on an SVG element, creating an element if necessary and assigning IDs.

Static
bezierIntersect Determines the point at which two specified Bézier segments intersect rounded to the nearest integer.

Static
copySvgBrush Copies the applied value or def element reference from a brush from one SVG element to another.

Static
correctError Returns the value of a number rounded to eliminate rounding error while accommodating a standard amount of precision for rendering to pixels.

Static
correctErrorFloor Returns the value of a number truncated after a number of digits to eliminate rounding error while accommodating a standard amount of precision for rendering to pixels.

Static
createBrushDef Creates an SVG element to represent a brush for an element with the specified width and height.

Static
createRotationMatrix Creates an affine transform matrix for a rotation transform.

Static
createScaleMatrix Creates an affine transform matrix for a scale transform.

Static
createShearMatrix Creates an affine transform matrix for a shear transform.

Static
createTranslationMatrix Creates an affine transform matrix for a translation.

Static
distance Determines the distance between two points regardless of the angle of their connecting line.

Static
divideBezierSegment Divides a Bézier segment defined by the specified points into two equivalent segments at the specified parameter t along the segment.

Static
getAbsoluteTransformMatrix Calculates the absolute transform matrix given a relative transform matrix and center point relative to bounds.

Static
getAverageColor Gets a color that represents the average of all colors defined as part of the brush.

Static
getBoundingBox Gets the bounding box that contains every point in points.

Static
getCanPathSegmentsIndirectlyOverlap Gets a value indicating whether two path segments that do not directly overlap can be rendered using the same path there is any continuous chain of overlapping path segments between them without changing the appearance of z-order.

Static
getCanPathSegmentsOverlap Gets a value indicating whether two overlapping path segments each with the specified brushes can be rendered using the same path.

Static
getContrastingColor Tests the background color ignoring transparency against readability with either a light or dark foreground (assuming white or black).

Static
getModifiedBrush Gets a brush with colors modified by the specified percentages.

Static
getSplineBezierControlPoints Gets the control points needed for a Bézier line segment to display a cardinal spline connecting two points with the specified tension.

Static
intersect Returns the intersection of two rectangles. If no intersection exists the left, right, top, and bottom properties are undefined.

Static
isInEllipse Gets a value indicating whether the specified point is at or within the bounds of an ellipse.

Static
isXYRequiredForSvgBrush Gets a value indicating whether the specified brush requires the horizontal and vertical position of the SVG element to which it's applied within its coordinate space if not 100%.

Static
lineIntersect Gets the point where the two specified line segments intersect.

Static
matrixMultiply Multiplies two affine transform matrices to produce a single transform that represents the application of matrix2 followed by matrix1.

Static
multiplyDashType Multiplies a dash type value by the stroke width so that the dash pattern is rendered relative to the width.

Static
roundPathPosition Rounds a position used in a path to ensure the rendered shape conforms to pixel boundaries (no anti-aliasing) where there are right angles.

Static
toCartesianPoint Converts polar coordinates to cartesian coordinates.

Static
toPolarPoint Converts cartesian coordinates to polar coordinates.

Static
toSVGMatrix Returns the SVG string representation of an affine transform.

Static
transform Applies an affine transform to a point.

Static
transformBounds Applies an affine transform to a bounds and returns the coordinates of the top-left, top-right, bottom-left, and bottom-right corners as arrays containing the X and Y coordinates, respectively.

Static
transformBoundsAligned Applies an affine transform to a bounds and returns the axis-aligned bounding box which contains the transformed bounds.